import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import menu from '@/components/menu'
import echarts from '@/components/echarts/echarts'
import rk_manage from '@/components/warehouse/rk_manage'

import add_rk from '@/components/warehouse/add_rk'
//需求单
import Procurement from '@/components/procurement/procurement'
import demandOrderDetails from '@/components/procurement/DemandList/demandOrderDetails'
import editDemandList from '@/components/procurement/DemandList/editDemandList'
import newDemandOrder from '@/components/procurement/DemandList/newDemandOrder'
import demandList from '@/components/procurement/DemandList/demandList'
//分配需求单
import distributionDemandOrder from '@/components/procurement/DistributionDemandOrder/distributionDemandOrder'
import distributionDemandOrderDetails from '@/components/procurement/DistributionDemandOrder/distributionDemandOrderDetails'
import operationDemandSheet from '@/components/procurement/DistributionDemandOrder/operationDemandSheet'
//采购单
import editPurchaseOrder from '@/components/procurement/PurchaseOrder/editPurchaseOrder'
import newPurchaseOrder from '@/components/procurement/PurchaseOrder/newPurchaseOrder'
import purchaseOrder from '@/components/procurement/PurchaseOrder/purchaseOrder'
import purchaseOrderDetails from '@/components/procurement/PurchaseOrder/purchaseOrderDetails'

import selectgoodslist from '@/components/salesmanagement/selectgoodslist'//选货单列表
import addselectgoodsorder from '@/components/salesmanagement/addselectgoodsorder'//新增选货单
import selectgoodsdetail from '@/components/salesmanagement/selectgoodsdetail'//选货单详情



//基础数据:area,goods,category,series,product_line
import area from "../components/basicdata/area";
import goods from "../components/basicdata/goods";
import category from "../components/basicdata/category";
import series from "../components/basicdata/series";
import product_line from "../components/basicdata/product_line";

//商品管理：product,follow,push,buy_price,sale_price
import product from "../components/commodity/product";
import follow_push from "../components/commodity/follow_push/follow_push";
import follow from "../components/commodity/follow_push/follow";
import push from "../components/commodity/follow_push/push";
import buy_price from "../components/commodity/buy_price";
import sale_price from "../components/commodity/sale_price";

//财务管理：recharge_record,customer_account
import recharge_record from "../components/finance/recharge_record";
import customer_account from "../components/finance/customer_account";

import ck_manage from '@/components/warehouse/ck_manage'
import add_ck from '@/components/warehouse/add_ck'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/menu',
      name: 'menu',
      component: menu,
      children: [
        {
          path: 'echarts',
          name: 'echarts',
          component: echarts
        },
        {
          path: 'rk_manage',
          name: 'rk_manage',
          component: rk_manage,
        },

        {
          path: 'add_rk',
          name: 'add_rk',
          component: add_rk,
        },

        //选货单列表
        {
          path: 'selectgoodslist',
          name: 'selectgoodslist',
          component: selectgoodslist
        },
        //新增选货单
        {
          path: 'addselectgoodsorder',
          name: 'addselectgoodsorder',
          component: addselectgoodsorder
        },
        {
          path: 'selectgoodsdetail',
          name: 'selectgoodsdetail',
          component:  selectgoodsdetail
        },
        

        // 采购
        {
          path: 'procurement',
          component: Procurement
        },
        {
          path: 'demandList',
          component: demandList
        },
        //新增需求单
        {
          path: 'newDemandOrder',
          component: newDemandOrder
        },
        //编辑需求单
        {
          path: 'editDemandList',
          component: editDemandList
        },
        //需求单详情
        {
          path: 'demandOrderDetails',
          component: demandOrderDetails
        },
        //分配需求单
        {
          path: 'distributionDemandOrder',
          component: distributionDemandOrder
        },

        // 基础数据:area,goods,category,series,product_line
        {
          path: 'area',
          name: 'area',
          component: area
        },
        {
          path: 'goods',
          name: 'goods',
          component: goods
        },
        {
          path: 'category',
          name: 'category',
          component: category
        },
        {
          path: 'series',
          name: 'series',
          component: series
        },
        {
          path: 'product_line',
          name: 'product_line',
          component: product_line
        },

        // 商品管理：product,follow_push,follow,push,buy_price,sale_price
        {
          path: 'product',
          name: 'product',
          component: product
        },
        {
          path: 'follow_push',
          name: 'follow_push',
          component: follow_push,
          children:[
            {
              path: 'follow',
              name: 'follow',
              component: follow
            },
            {
              path: 'push',
              name: 'push',
              component: push
            },
          ]
        },
        {
          path: 'buy_price',
          name: 'buy_price',
          component: buy_price
        },
        {
          path: 'sale_price',
          name: 'sale_price',
          component: sale_price
        },
        {
          path: 'ck_manage',
          name: 'ck_manage',
          component: ck_manage,
        },
        {
          path: 'add_ck',
          name: 'add_ck',
          component: add_ck,
        },

        // 财务管理：recharge_record,customer_account
        {
          path: 'recharge_record',
          name: 'recharge_record',
          component: recharge_record
        },
        {
          path: 'customer_account',
          name: 'customer_account',
          component: customer_account
        },

      ]
    },
  ]
})
